using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if ((Session["user"]!=null) || (Session["roomid"]!=null))
        {
        Response.Redirect("Chat.aspx");
        }
        if (!IsPostBack)
        {
            this.Label1.Text = "";
        }
    }
    protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
    {
        this.Label1.Text=Login1.UserName.ToString();
        Session["user"] = Login1.UserName.ToString();
        Session["roomid"] = Login1.Password.ToString();
        Session["userID"] = 1;
        Response.Redirect("Chat.aspx");
        
    }
}